#ifndef VIDEOFILEDETECTTHREADHREAD_H
#define VIDEOFILEDETECTTHREADHREAD_H

#include <QObject>
#include <QThread>
#include <QTimer>
#include <QDir>
#include <QFileDialog>
#include <QMessageBox>


#include "detectthread.h"

class VideoFileDetectThread: public DetectThread
{
    Q_OBJECT
public:
    VideoFileDetectThread(QObject* parent = nullptr);

    void init(std::shared_ptr<Inference> inference,QString& videofile,bool RunWithCuda,bool islabel);
    cv::VideoCapture cap;
    QString videofile;
    void stop() override;
    void do_detect() override;
    void release() ;
    int get_detect_id() override;

signals:
    void startdetect();
    void onMessage(QString err_msg);
    void imageReady( QPixmap &pixmap);
    void detecterrored(QString err_msg);
    void detectfinished(int stau,QString err_msg);
};

#endif // VIDEOFILEDETECTTHREADHREAD_H
